/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* ===== addressbook.css ================================================
  == Styles for the main Address Book window.
  ======================================================================= */

@import url("chrome://messenger/skin/");

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

#addressbookWindow:-moz-lwtheme {
  background-repeat: no-repeat;
  background-position: top right;
}

/* ::::: primary toolbar buttons ::::: */

.toolbarbutton-1{
  -moz-box-orient: vertical;
  min-width: 0px;
}

toolbox[labelalign="end"] .toolbarbutton-1 {
  -moz-box-orient: horizontal;
}

toolbox[labelalign="end"] > toolbar[mode="full"] .toolbarbutton-1 .toolbarbutton-text {
  -moz-padding-start: 2px;
}

toolbox[labelalign="end"] > toolbar[mode="full"] deck .toolbarbutton-text {
  text-align: start;
}

#button-newcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(44px 22px 66px 0px); /* contact-add.png */
}

#button-newcard[disabled="true"] {
  -moz-image-region: rect(66px 22px 88px 0px); /* contact-add-disabled.png */
} 

#button-newlist {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(88px 22px 110px 0px); /* contact-list-add.png */
}

#button-newlist[disabled="true"] {
  -moz-image-region: rect(110px 22px 132px 0px); /* contact-list-add-disabled.png */
} 

#button-editcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(132px 22px 154px 0px); /* contact-properties.png */
}

#button-editcard[disabled="true"] {
  -moz-image-region: rect(154px 22px 176px 0px); /* contact-properties-disabled.png */
}

#button-newmessage {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(176px 22px 198px 0px); /* message-compose.png */
}

#button-newmessage[disabled] {
  -moz-image-region: rect(198px 22px 220px 0px); /* message-compose-disabled.png */
}

#button-newim {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar.png");
  -moz-image-region: rect(0px 22px 22px 0px); /* chat-new.png */
}
 
#button-newim[disabled] {
  -moz-image-region: rect(22px 22px 44px 0px); /* chat-new-disabled.png */
} 

#button-abdelete {
  list-style-image: url("moz-icon://stock/gtk-delete?size=toolbar")
}
#button-abrefresh
{
    list-style-image: url("chrome://messenger/skin/addressbook/icons/refresh.png");
}

#button-abbackup
{
   list-style-image: url("chrome://messenger/skin/addressbook/icons/backup.png"); 
}

#button-absync
{
    list-style-image: url("chrome://messenger/skin/addressbook/icons/sync-19.png");
}
#button-abdelete[disabled] {
  list-style-image: url("moz-icon://stock/gtk-delete?size=toolbar&state=disabled")
}

/* ::::: small primary toolbar buttons ::::: */

toolbar[iconsize="small"] #button-newcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(32px 16px 48px 0px); /* contact-add-small.png */
}

toolbar[iconsize="small"] #button-newcard[disabled] {
  -moz-image-region: rect(48px 16px 64px 0px); /* contact-add-small-disabled.png */
}

toolbar[iconsize="small"] #button-newlist {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(64px 16px 80px 0px); /* contact-list-add-small.png */
}

toolbar[iconsize="small"] #button-newlist[disabled] {
  -moz-image-region: rect(80px 16px 96px 0px); /* contact-list-add-small-disabled.png */
}

toolbar[iconsize="small"] #button-editcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(96px 16px 112px 0px); /* contact-properties-small.png */
}

toolbar[iconsize="small"] #button-editcard[disabled="true"] {
  -moz-image-region: rect(112px 16px 128px 0px); /* contact-properties-small-disabled.png */
}

toolbar[iconsize="small"] #button-newmessage {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(128px 16px 144px 0px); /* message-compose-small.png */
}

toolbar[iconsize="small"] #button-newmessage[disabled] {
  -moz-image-region: rect(144px 16px 160px 0px); /* message-compose-small-disabled.png */
}

toolbar[iconsize="small"] #button-newim {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(0px 16px 16px 0px); /* chat-new-small.png */
}

toolbar[iconsize="small"] #button-newim[disabled] {
  -moz-image-region: rect(16px 16px 32px 0px); /* chat-new-small-disabled.png */
}

toolbar[iconsize="small"] #button-abdelete {
  list-style-image: url("moz-icon://stock/gtk-delete?size=menu");
}

toolbar[iconsize="small"] #button-abdelete[disabled] {
  list-style-image: url("moz-icon://stock/gtk-delete?size=menu&state=disabled");
}

#abContent {
  text-shadow: none;
  background-color: -moz-Dialog;
}

/* ::::: directory pane adjustments ::::: */

#abDirTreeHeader {
  border-bottom: 1px solid ThreeDShadow;
}

#abDirTreeHeader-title {
  -moz-padding-start: 4px;
}

/* ::::: directory pane icons ::::: */

treechildren::-moz-tree-image(DirCol) {
  -moz-margin-end: 2px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addrbook.png");
}

treechildren::-moz-tree-image(DirCol, IsMailList-true) {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/ablist.png");
}

treechildren::-moz-tree-image(DirCol, IsRemote-true) {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/remote-addrbook.png");
}

treechildren::-moz-tree-image(DirCol, IsRemote-true, IsSecure-true) {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/secure-remote-addrbook.png");
}

#dirTree {
  border-bottom: 1px solid ThreeDShadow;
}

#dirTree [sortDirection="ascending"],
#dirTree [sortDirection="descending"] {
  list-style-image: none;
}

/* ::::: splitters ::::: */

#dirTree-splitter {
  -moz-appearance: none;
  -moz-border-end: 1px solid ThreeDShadow;
  /* splitter grip area */
  width: 4px;
  /* make only the splitter border visible */
  -moz-margin-start: -4px;
  /* because of the negative margin needed to make the splitter visible */
  position: relative;
  z-index: 10;
}

#results-splitter {
  -moz-appearance: none;
  border-top: 1px solid ThreeDShadow;
  /* splitter grip area */
  height: 4px;
  /* make only the splitter border visible */
  margin-bottom: -4px;
  /* because of the negative margin needed to make the splitter visible */
  position: relative;
  z-index: 10;
}

/* ::::: results pane ::::: */

#GeneratedName {
  -moz-padding-start: 26px;
}

treechildren::-moz-tree-image(GeneratedName) {
  -moz-margin-end: 2px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/abcard.png");
}

treechildren::-moz-tree-image(GeneratedName, MailList) {
  -moz-margin-end: 2px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/ablist.png");
}

treechildren::-moz-tree-cell-text(GeneratedName) {
  -moz-padding-start: 0;
}

/* ::::: card view pane ::::: */

#CardViewOuterBox {
  border-bottom: 1px solid ThreeDShadow;
}

#CardViewBox {
  -moz-user-focus: ignore;
  overflow: auto;
  min-width: 150px;
  background-color: -moz-Field;
  color: -moz-FieldText;
}

#CardViewInnerBox {
  margin-top: 2px;
  margin-bottom: 2px;
  padding: 0 8px;
}

#CardTitle {
  font-size: 150%;
  font-weight: bold;
  border-bottom: 2px solid -moz-FieldText;
  min-width: 120px;
  margin: 0px;
}
 
.cardViewGroup {
  margin-top: 8px;
  padding-bottom: 5px;
  min-width: 50px;
}

.CardViewHeading {
  padding: 1px;
  -moz-padding-start: 5px;
  background-color: Highlight;
  color: HighlightText;
  font-weight: bold;
  min-width: 30px;
}

#cvPhoto {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/contact-generic.png");
}

#cvBuddyIcon {
  -moz-padding-start: 20px;
  padding-top: 2px;
}

.CardViewText,
.CardViewLink {
  -moz-padding-start: 20px;
  -moz-padding-end: 2px;
  min-width: 30px;
  margin: 0px;
}

.CardViewLink {
  color: -moz-nativehyperlinktext;
  cursor: pointer;
}

#cvHomeMapIt, #cvWorkMapIt {
  margin-bottom: 0px;
}

html|a {
  -moz-padding-start: 0px;
  -moz-padding-end: 2px;
  border: none !important;
  text-decoration: underline;
}

html|p {
  border: none !important;
}

/** Stock icons for the menu items. */
#menu_New {
  -moz-binding: url("chrome://global/content/bindings/menu.xml#menu-iconic");
  list-style-image: url("moz-icon://stock/gtk-new?size=menu");
}

#menu_newContact,
#dirTreeContext-newcard {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(32px 16px 48px 0px); /* contact-add-small.png */
}

#menu_newList,
#dirTreeContext-newlist {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(64px 16px 80px 0px); /* contact-list-add-small.png */
}

#menu_newMessage,
#abResultsTreeContext-newmessage {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(128px 16px 144px 0px); /* message-compose-small.png */
}

#abResultsTreeContext-newim {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(0px 16px 16px 0px); /* chat-new-small.png */
}

#menu_search_addresses {
  list-style-image: url("moz-icon://stock/gtk-find?size=menu");
}

#menu_properties,
#dirTreeContext-properties,
#abResultsTreeContext-properties {
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addressbook-toolbar-small.png");
  -moz-image-region: rect(96px 16px 112px 0px); /* contact-properties-small.png */
}

#dirTreeContext-delete,
#abResultsTreeContext-delete {
  list-style-image: url("moz-icon://stock/gtk-delete?size=menu");
}

#printPreviewMenuItem,
#printPreviewAddressBook {
  list-style-image: url("moz-icon://stock/gtk-print-preview?size=menu");
}

#printMenuItem,
#printAddressBook {
  list-style-image: url("moz-icon://stock/gtk-print?size=menu");
}
